﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://wubiyu.cnblogs.com">
<head>
      <title></title>
      <link href="../../Theme/DomExtGray/gray.min.css" rel="Stylesheet" type="text/css" />
      <link href="PageModel.css" rel="Stylesheet" type="text/css" />
      <script type="text/javascript" src="../../domExt.min.js"></script>
</head>
<body>
      <div class="fun_title">
            _h.Set_hname(newNameStr);
      </div>
      <div class="fun_content">
            描述：修改hdomext 框架的 _h 命名空间<br />
      </div>
      <div class="fun_title2">
            参数:
      </div>
      <div class="fun_content2">
           newNameStr：命名空间名称。<br />
      </div>
      <div class="fun_title2">
            示例:
      </div>
       <div class="code">
            &lt;div id=&quot;div1&quot;&gt;&lt;div class=&#39;testclass&#39;&gt;testdiv&lt;/div&gt;&lt;/div&gt;
      </div>
      <div class="code">
            &lt;script type=&quot;text/javascript&quot;&gt;<br />
            &nbsp;&nbsp;&nbsp; _h.Set_hname(&quot;_hy&quot;);
            <br />
&nbsp;&nbsp;&nbsp; alert(_hy.GetUrlRoot());<br />
            &lt;/script&gt;;</div>
            <br />
             <h:btn onclick="run_click();">执行脚本</h:btn>

             <script type="text/javascript">
                   function run_click() {
                         _h.Set_hname("_hy");
                         alert(_hy.GetUrlRoot());
                  }
             </script>
     
      
</body>
</html>
